﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCPnuts.ISkyDiskFileSystem.Interfaces;
using CCPnuts.Pack;

namespace CCPnuts.ISkyDiskFileSystem
{
    public class Uploader : Transmitor
    {
        #region Packed Target

        internal Uploader(IPacked packed) : base(packed) { }

        internal new I_Uploader Packed { get { return (I_Uploader)base.Packed; } }

        #endregion

        #region Proxy Members

        #region Essential Members

        /// <summary>
        /// Gets the target directory.
        /// </summary>
        public SkyDirectory TargetDirectory
        {
            get
            {
                return (SkyDirectory)Util.NNTar(Packed.TargetDirectory);
            }
        }

        /// <summary>
        /// Gets the source file
        /// </summary>
        public string SourceFile { get { return Packed.SourceFile; } }

        #endregion

        #endregion

        #region Own Members

        public override TransmissionTypes TransmissionType
        {
            get { return TransmissionTypes.Upload; }
        }

        #endregion
    }

    public static partial class PackedInfos
    {
        public static PackedInfo Uploader { get { return new PackedInfo(p => new Uploader(p)); } }
    }
}
